﻿<%@ Page Language="C#" MasterPageFile="~/Buyer/BuyerMasterPage.master" AutoEventWireup="true" CodeFile="BuyerJobDetail.aspx.cs" Inherits="BuyerJobDetail"%>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<script type="text/javascript" src="../js/Validation.js"></script>
<link href="../css/jquery.mCustomScrollbar.css" rel="stylesheet" type="text/css" />
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script type="text/javascript" src="../js/jquery.easing.1.3.js"></script>

<script type="text/javascript" src="../js/jquery.mousewheel.min.js"></script>
<script language="javascript" type="text/javascript">
function PerformAction(BidID,ActionType)
{
 var oWnd = $find("<%=radWin.ClientID%>");
 oWnd.setUrl("Action.aspx?BidID=" + BidID+"&at=" + ActionType);
 oWnd.show();
}

function UploadFiles(DocumentType) {
    var oWnd = $find("<%=radWinUploadFile.ClientID%>");
    oWnd.setUrl("uploadfile.aspx?DocType=" + DocumentType);
    oWnd.show();
}

function DeleteFiles(jobid,fileinfo) {
    var oWnd = $find("<%=radWinDeleteFile.ClientID%>");
    oWnd.setUrl("DeleteFiles.aspx?jobid=" + jobid + "&fileinfo=" + fileinfo);
    oWnd.show();
}

function ChangeBidSettings(Option) {
    var oWnd = $find("<%=radWinBiddingSettings.ClientID%>");
    oWnd.setUrl("BidingSettings.aspx?Option=" + Option);
    oWnd.show();
}
function ReportViolation(For, ElementID) {
    var oWnd = $find("<%=radWinReportViolation.ClientID%>");
    oWnd.setUrl("ReportViolation.aspx?For=" + For + "&ElementID=" + ElementID);
    oWnd.show();
}
function AddEditJobDescription(Action) {
    var oWnd = $find("<%=radWinAddEditJobDescription.ClientID%>");
    oWnd.setUrl("AddEditJobDescription.aspx?Action=" + Action);
    oWnd.show();
}

function setHeight() {
    document.getElementById('txtjobdescription').style.height =
            document.getElementById('txtjobdescription').scrollHeight + 'px';
}



</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
        </telerik:RadWindowManager>
<!-- left col open -->
    <div class="leftcol">

				<!-- page title section open -->
        <div class="pagetitle_bg">
          <div class="pagetitle_wrap">
            <div class="left"><img src="../images/buyr.gif" alt="" width="56" height="57" /></div>
            <div class="right" style="background:none; padding-left:0px; margin-top:-5px">
              <h1><%=jobObj.JobTitle%></h1>
              <p class="consultant">Consultant:<span><a href="#"><%if (jobObj.ConsultantID != null) Response.Write(ConstructionBidOnline.Biz.RegisteredUser.GetRegisteredUserByID(ConstructionBidOnline.Biz.ConsultantsInformation.GetConsultantsInformationByProfileID(jobObj.ConsultantID).UserID).FirstName + " " + ConstructionBidOnline.Biz.RegisteredUser.GetRegisteredUserByID(ConstructionBidOnline.Biz.ConsultantsInformation.GetConsultantsInformationByProfileID(jobObj.ConsultantID).UserID).LastName); else Response.Write("None");%></a></span></p>
              <%if (jobObj.ConsultantID == null)
                { %>
              <p class="consultant">Consultant:<span>n/a <a href="#" class="add_consltnt">Add consultant</a></span></p>
              <div class="consltnt_cont">
              
                <!-- add content on click of checkbox open -->
                  <div id="mcs_container">
                    <div class="customScrollBox">
                      <div class="container">
                        <div class="content">
                        
                        <%
                              ConstructionBidOnline.Biz.RegisteredUserCollection ruobj = ConstructionBidOnline.Biz.RegisteredUser.GetAllRegisteredUsersByType("Consultant");
                              if (ruobj.Count > 0)
                              {
                                  for (int i = 0; i < ruobj.Count; i++)
                                  {
                                      ConstructionBidOnline.Biz.ConsultantsInformation ccobj = ConstructionBidOnline.Biz.ConsultantsInformation.GetConsultantsInformationByID(ruobj[i].RegisteredUserID);
                                      if (ccobj != null)
                                      {
                                          ConstructionBidOnline.Biz.RegisteredUser ruccobj = ConstructionBidOnline.Biz.RegisteredUser.GetRegisteredUserByID(ccobj.UserID);
                                          if (ruccobj != null)
                                          {
                                              ConstructionBidOnline.Biz.ProfileImages profileimageObj = ConstructionBidOnline.Biz.ProfileImages.GetProfileImage(ruccobj.RegisteredUserID);
                               %>
                          <div class="show_chk_row">
                              <div class="col1">
                                <input type="radio" name="rblistconsultant" id="<%=ruccobj.RegisteredUserID %>"  value="<%=ccobj.ProfileID %>" />
                              </div>
                              <div class="col2"><a href="#">
                              <% 
                                  if (profileimageObj != null)
                                  {
                                                  %>
                                <img src="../ProfileImages/<%=profileimageObj.ProfileImage %>" alt="" />
                               <%}
                                  else
                                  {
                                               %> 
                                           <img src="../images/img.jpg" alt="" />
                                               <%} %>
                                </a></div>
                              <div class="col3">
                                <p><a href="ConsultantPublicProfile.aspx?ID=<%=ccobj.ProfileID %>" target="_blank"><%=ruccobj.FirstName+" "+ruccobj.LastName %></a></p>
                                <span>Profile ID: <%=ccobj.ProfileID %></span></div>

                            </div>
                          <% }
                              }
                                  }
                              } 
                                %>
                          
                          <h1>&nbsp;</h1>
                        </div>

                      </div>
                      <div class="dragger_container">
                        <div class="dragger"></div>
                      </div>
                    </div>
                    <a href="#" class="scrollUpBtn"></a> <a href="#" class="scrollDownBtn"></a> </div>
                  <!-- add content on click of checkbox close -->
              <div>
                  <asp:Button ID="btn_consultant" runat="server" Text="Add" 
                      onclick="btn_consultant_Click" />
              </div>
              </div>
              <%} %>
            </div>
          </div>
        </div>
        <!-- page title section close -->
        
        
      <!-- main box open -->
      <div class="mainbox_wrap">
        <div class="mainbox_top"></div>
          <div class="mainbox_cont">
        <!-- job detail tab block open -->

        <div class="byr_jobdet_block">
        	<div class="brys_tabs">
            	<ul class="b_tabs">
                  <li class="sel" lang="#b_tabs1"><a href="#"><span>Overview</span></a></li>
                  <li lang="#b_tabs2"><a href="#"><span>Project Summary</span></a></li>
                  <li lang="#b_tabs3"><a href="#"><span>Public Messages </span></a></li>
                  <li lang="#b_tabs4"><a href="#"><span>Attachments</span></a></li>
                    <%if (jobObj.JobStatus == "Open")
                      { %>
                  <li lang="#b_tabs5"><a href="#"><span>Settings</span></a></li>
                  <%} %>
                  <li lang="#b_tabs6" xml:lang="#b_tabs6"><a href="#"><span>Meeting</span></a></li>
                </ul>
        	</div>
            
            <!-- tab content open -->
            <div class="brys_tabs_cont">
            <div class="brys_tabs_cont_wrap">
            
            <!-- tab 1 content open -->
            <div id="b_tabs1" class="byr_tab_content">

            	<!-- link block open -->
                <div class="byrs_link_blk">
                <div class="byrs_link_blk_lft">
                	<div class="byrs_link_blk_rgt"><a href="#" class="sel" lang="#b_ovr_tabs1">Proposal Summary</a> | <a href="#" lang="#b_ovr_tabs2">History</a> | <a href="#" lang="#b_ovr_tabs3">Invites</a></div>
                   </div>

                </div>
                
                
                 <!-- content for 1st link open -->
                    <div id="b_ovr_tabs1" class="byr_ovr_tab_content">
                    <!-- left content open -->
                    <div class="left">
                    	<div>
                        	<p class="blu_title">Bidding Ends</p>
                            <p class="date">(<%=jobObj.JobExpiryDate %>)</p>
                            <p class="blu_title">Job Status</p>
                            <p class="date">(<%=jobObj.JobStatus %>)</p>
                            <p class="date"><%if ((jobObj.JobStatus == "Awarded") || (jobObj.JobStatus == "Completed") || (jobObj.JobStatus == "Work in progress") || (jobObj.JobStatus == "Disputed"))
                                                                       {%>to<a href="#"> <%Response.Write(ConstructionBidOnline.Biz.CompanyInformation.GetCompanyInformationByID(ConstructionBidOnline.Biz.Bid.GetBidByBidID(jobObj.AwardedBidID).CompanyID_RKRegisteredUser).Companyname); %> </a><br /> View <a href='JobContract.aspx?jid=<%=Session["jobid"].ToString()%>'>Contract</a> Details<%} %></p>
                        </div>
                      </div>
                    <!-- left content close -->

                    
                    <!-- right content open -->
                    <div class="right">
                    	<div class="row">
                        	<div class="col1">Proposal Amount:</div>
                        	<div class="col2">Average: <span>
                                <asp:Label ID="lblaverage" runat="server" Text=""></asp:Label></span></div>
                        </div>
                        <div class="horidot"></div>

                        <div class="row">
                        	<div class="col1">Invited Providers:</div>
                       	    <div class="col2">(<a href="#"><%=DataSourceJobInvitations.Count %></a>) Invites (<a href="javascript: void(0)"><%=BidTable.Count%></a>) Proposals (<a href="#"><%=BidTableDeclined.Count%></a>) Decline</div>
                        </div>
                        <div class="horidot"></div>

                        <div class="row"><span class="blu_title">Who can submit proposals:</span>  <%=BidCatgegoryObj.BidCategoryName%></div>
                    </div>
                    <!-- right content close -->
                    </div>
                    
                    
                    <!-- content for 1st link close -->
                    
                    <!-- content for 2nd link open -->
                    <div id="b_ovr_tabs2" class="byr_ovr_tab_content">

                     <!-- history content open -->
                     <!-- data row open -->
                     <%for (int i = 0; i < DataSourceJobHistory.Count; i++)
                       { %>
                     <div class="histry_row">
                       	<div class="col1"><%=DataSourceJobHistory[i].ActionDate%></div>
                        <div class="col2"><%=DataSourceJobHistory[i].ActionPerformed%>.</div>
                     </div>
                     <%} %>
                     <!-- data row close -->
                     <!-- history content close -->
                    </div>
                    <!-- content for 2nd link close -->
                    
                    <!-- content for 3rd link open -->
                    <div id="b_ovr_tabs3" class="byr_ovr_tab_content" style="padding-left:0; padding-right:0; width:632px">
                      <div class="attach_cont_wrap">
                        <div class="attach_cont_top">

                          <div class="attach_cont_btm">
                            <div id="attach_tab3" >
                              <!-- table heading -->
                              <div class="attechment_link"><a href="../ContractorSearchResult.aspx?page=1&Keyword=" class="invitenew">New invitation</a></div>
                                <div class="attechment_link"><a href="MyFavorites.aspx?Page=1" class="invitenew">Invite from Favorite</a></div>
                              <div class="attch_tbl_hd">
                                <div class="col1">Provider</div>
                                <div class="col2">Invite Date</div>
                                <div class="col3">Status</div>
                              </div>
                              <!-- tabel heading -->
                              <!-- table heading -->
                              
                              <div class="attch_tbl_row">
                              <%if (DataSourceJobInvitations.Count > 0)
                                {
                                    for (int i = 0; i < DataSourceJobInvitations.Count; i++)
                                    {%>
                                <div class="col1"><a href="#" class="img"><img src="../images/byrs/attach_thumb.gif" alt="" /></a><span><a href="#"><%=DataSourceJobInvitations[i].CompanyName%></a></span></div>
                                <div class="col2"><%=DataSourceJobInvitations[i].InvitationDate%></div>

                                <div class="col3"><%=DataSourceJobInvitations[i].Status%></div>
                                   <%}
                                }
                                else
                                {
                                    Response.Write("No invitations sended yet.");
                                } %>
                              </div>
                           
                              <!-- tabel heading -->
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>

                    <!-- content for 3rd link close -->

            </div>

            <!-- tab 1 content close -->
            <!-- tab 2 content open -->
             <div id="b_tabs2" class="byr_tab_content">
                 <h1 class="overview">Project Description <a href="javascript: void(0)" onclick="AddEditJobDescription('Add')" class="addmore">Add more</a> <a href="javascript: void(0)" onclick="AddEditJobDescription('Edit')" class="editdes">Edit</a></h1>
                    <textarea class="prod_des_tarea" readonly="readonly" id="txtjobdescription">
                    <%=jobObj.JobDescription %>
                    </textarea>
<script type="text/javascript">
    setHeight();
</script>

                 <h1 class="overview">Category / Sub-Category </h1>
                 <%=jobObj.JobCategoryName  %> / <%=jobObj.JobSubCategoryName  %> 
             </div>

            <!-- tab 2 content close -->
            <!-- tab 3 content open -->
             <div id="b_tabs3" class="byr_tab_content">
             	<!-- text area for message -->
             	<div class="byr_msg_tarea">
                     <asp:TextBox ID="txtmessage" runat="server" CssClass="msg_tarea" TextMode="MultiLine" ></asp:TextBox>
             	</div>
                <div class="msg_detail">
                     <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ValidationGroup="PM" runat="server" ControlToValidate="txtmessage" ErrorMessage="* Please enter some message" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:Label ID="lblfeedback" runat="server" Text="" Visible="false"></asp:Label>
                    <asp:LinkButton ID="bttnpublicmessagesave" runat="server" CssClass="save" 
                         onclick="bttnpublicmessagesave_Click" ValidationGroup="PM" >Save</asp:LinkButton></div>
                <!-- question area open -->
             	<div class="byr_qestion_cont">
             	 <%if(DataSourcePublicMessageofContractor.Count > 0){ %>
                	<div class="imgblk"><a href="#"><img src="../images/byrs/byr_qst_img.jpg" alt="" /></a></div>
                    <!-- question open -->
                    <div class="qst_wrap"><div class="qst_top"><div class="qst_btm">
                    <!-- question detail open -->
                   
                    <div class="qst_detail"><a href="#">
                        <asp:Label ID="lblprofilename" runat="server" Text=""></asp:Label></a><%=DataSourcePublicMessageofContractor[0].PostingDate.ToString() %></div>
                    <p><%=DataSourcePublicMessageofContractor[0].MessageText %></p>
                    <!-- question detail close -->
                    </div></div></div>
                    <!-- question close -->
                    <%} %>
                    <!-- answer open -->
                     <%if(DataSourcePublicMessageofBuyer.Count > 0){ %>
                    <div class="ans_wrap"><div class="ans_top"><div class="ans_btm">
                    <!-- question detail open -->
                    <div class="ans_detail"><%=DataSourcePublicMessageofBuyer[0].PostingDate %></div>
                    <p><%=DataSourcePublicMessageofBuyer[0].MessageText %></p>

                    <!-- question detail close -->
                    </div></div></div>
                    <!-- answer close -->
                    <%} %>
                     <div class="msg_detail"><span class="qstpost">Total Public Message posted (<span><%=(DataSourcePublicMessageofBuyer.Count + DataSourcePublicMessageofContractor.Count) %></span>)</span><a href="PublicMessages.aspx?page=1&jobid=<%=Session["jobid"].ToString()%>">view all</a></div>
                </div>
             	<!-- question area close -->
             </div>

            <!-- tab 3 content close -->
            <!-- tab 4 content open -->
                  <div id="b_tabs4" class="byr_tab_content">
                    <div class="attach_tab_bar">
                      <ul class="attach_tab">
                        <li lang="#attach_tab1"><a href="#"><span>Photo</span></a></li>

                        <li lang="#attach_tab2"><a href="#"><span>Video</span></a></li>
                        <li lang="#attach_tab_3"><a href="#"><span>Document</span></a></li>
                      </ul>
                      <div class="attechment_link"><a href="javascript: void(0)" onclick="UploadFiles('Photo'); return false;"  class="attechphoto" id="addphoto">Add photo</a></div>
                      <div class="attechment_link"><a href="javascript: void(0)" onclick="UploadFiles('Document'); return false;" class="adddoc" id="adddocument">Add document</a></div>
                    </div>
                    <div class="attach_cont_wrap">

                      <div class="attach_cont_top">
                        <div class="attach_cont_btm">
                          <!-- content for photo open -->
                          <div id="attach_tab1" class="attach_tab_content">
                            <!-- table heading -->
                            <div class="attch_tbl_hd">
                              <div class="col1">My Photos</div>
                              <div class="col4">Photo uploaded on</div>

                            </div>
                            <!-- tabel heading -->
                            <!-- table heading -->
                            <%if (DataSourceJobImages.Count > 0)
                              {
                                  for (int i = 0; i < DataSourceJobImages.Count; i++)
                                  {%>
                            <div class="attch_tbl_row">
                              <div class="col1"><a href="../JobAttachments/Images/<%=DataSourceJobImages[i].FileInfo%>" class="img"><img height="38px" width="42px" src="../JobAttachments/Images/<%=DataSourceJobImages[i].FileInfo%>" alt="" /></a><span><a href="../JobAttachments/Images/<%=DataSourceJobImages[i].FileInfo%>"><%=DataSourceJobImages[i].FileTitle%></a></span></div>
                              <div class="col4"><%=DataSourceJobImages[i].UploadDate.Value.ToShortDateString()%>/ <a href="javascript: void(0)" onclick="DeleteFiles('<%=DataSourceJobImages[i].JobID%>','<%=DataSourceJobImages[i].FileInfo%>'); return false;"   id="delimage">Delete</a></div>
                            </div>
                            <%
                                }
                              }
                              else 
                              {
                                  Response.Write("No Photos uploaded yet.");
                              } %>
                            <!-- tabel heading -->

                          </div>
                          <!-- content for photo close -->
                          <!-- content for video open -->
                          <div id="attach_tab2" class="attach_tab_content">
                            <!-- table heading -->
                            <div class="attch_tbl_hd">
                              <div class="col1">My Videos</div>
                              <div class="col4">Video uploaded on</div>

                            </div>
                            <!-- tabel heading -->
                            <!-- table heading -->
                           <%if (DataSourceJobVideos.Count > 0)
                              {
                                  for (int i = 0; i < DataSourceJobVideos.Count; i++)
                                  {%>
                            <div class="attch_tbl_row">
                              <div class="col1"><a href="#" class="img"><img src="../images/byrs/attach_thumb.gif" alt="" /></a><span><a href="#"><%=DataSourceJobVideos[i].FileTitle%></a></span></div>
                              <div class="col4"><%=DataSourceJobVideos[i].UploadDate%></div>
                            </div>
                            <%
                                }
                              }
                              else 
                              {
                                  Response.Write("No Videos uploaded yet. You can not upload any video by your own. It can only be uploaded by any Construction Consultant");
                              } %>
                            <!-- tabel heading -->

                          </div>
                          <!-- content for video close -->
                          <!-- content for video open -->
                          <div id="attach_tab_3" class="attach_tab_content">
                            <!-- table heading -->
                            <div class="attch_tbl_hd">
                              <div class="col1">My Documents</div>
                              <div class="col4">Document uploaded on</div>
                              
                            </div>
                            <!-- tabel heading -->
                           <%if (DataSourceJobDocuments.Count > 0)
                              {
                                  for (int i = 0; i < DataSourceJobDocuments.Count; i++)
                                  {%>
                            <!-- table row open -->
                            <div class="attch_tbl_row">
                              <div class="col1-1"><a href="../JobAttachments/Documents/<%=DataSourceJobDocuments[i].FileInfo%>" class="doc"><%=DataSourceJobDocuments[i].FileInfo%></a></div>
                              <div class="col4-1"><%=DataSourceJobDocuments[i].UploadDate.Value.ToShortDateString()%>/ <a href="javascript: void(0)" onclick="DeleteFiles('<%=DataSourceJobDocuments[i].JobID%>','<%=DataSourceJobDocuments[i].FileInfo%>'); return false;"   id="delfile">Delete</a></div>
                              
                            </div>
                            <!-- table row close -->
                           <%
                                }
                              }
                              else 
                              {
                                  Response.Write("No Documents uploaded yet.");
                              } %>
                          </div>
                          <!-- content for video close -->
                        </div>
                      </div>
                    </div>

                    <p class="attach_btmcont">Providers are not automatically notified when you add new attachments to your project. If you would like to let 
                      everyone know, please post a public message.</p>
                  </div>
                  <!-- tab 4 content close -->
            <!-- tab 5 content open -->
            <div id="b_tabs5" class="byr_tab_content">
              <!-- link block open -->

              <div class="byrs_link_blk">
                <div class="byrs_link_blk_lft">
                  <div class="byrs_link_blk_rgt"><a href="#" class="sel">Bidding Settings</a> </div>
                </div>
              </div>
              <!-- content for 1st link open -->
             
              <div class="setting_tab_cont">
                <!-- left content open -->
                  <%--<asp:UpdatePanel ID="UpdatePanel2" runat="server">
                  <ContentTemplate>--%>
                <div class="left">
                <p>Selected Bid Category: <strong> <%=ConstructionBidOnline.Biz.BidCategory.GetBidCategoryByID(jobObj.BidCategoryID).BidCategoryName %></strong></p> 
                
                    <p class="blu_title">Do you want to change the preference for this job ?</p>
                    <p>
                        <asp:RadioButtonList ID="rblbidcategory" runat="server" 
                            RepeatDirection="Horizontal" AutoPostBack="true" 
                            onselectedindexchanged="rblbidcategory_SelectedIndexChanged">
                        </asp:RadioButtonList>
                    </p>
                    
                    <asp:Label ID="lblbidfeedback" runat="server" Text="Bid Category updated successfully." Visible="false" ForeColor="Green"></asp:Label>
                </div>
                
                <!-- left content close -->
                <!-- right content open -->

                <%--<div class="right">
                    <asp:ImageButton ID="bttnsavebidcategory" runat="server" onclick="bttnsavebidcategory_Click" src="../images/trans.gif"/>
                </div>--%>
                <%--</ContentTemplate>
                </asp:UpdatePanel>--%>
                <!-- right content close -->
                <div class="bttnbox">
                <a href="javascript: void(0)" onclick="ChangeBidSettings('0')">Extended Bidding </a>
                <a href="javascript: void(0)" onclick="ChangeBidSettings('1')">End Bidding Now  </a>
                <a href="javascript: void(0)" onclick="ChangeBidSettings('2')">Cancel Project</a>
                <a href="javascript: void(0)" onclick="ChangeBidSettings('3')">Repost Job</a>
                </div>
                
                
                </div><div>
              
              </div>
            </div>
            <!-- tab 5 content close -->
            
            <!-- tab 6 content open -->
                  <div id="b_tabs6" class="byr_tab_content">
                    <!-- link block open -->
                    <!-- content for 1st link open -->
                    <%--<div class="attach_tab_bar">
                     
                      <div class="attechment_link"><a href="javascript: void(0)" onclick="AddMeeting()" class="addmeeting">Add meeting</a></div>

                    </div>--%>
                    <div class="attach_cont_wrap">
                      <div class="attach_cont_top">
                        <div class="attach_cont_btm">
                          <div id="attach_tab4" >
                           	 
                            <div class="attch_tbl_hd">
                              <div class="col1_meet">Date / time</div>
                              <div class="col2_meet">Purpose</div>

                              <div class="col3_meet">Location</div>
                            </div>
                            <%if (DataSourceMeetingsInfo.Count > 0)
                              {
                                  for (int i = 0; i < DataSourceMeetingsInfo.Count; i++)
                                  { %>
                            <div class="attch_tbl_row">
                              <div class="col1_meet"><%=Convert.ToDateTime(DataSourceMeetingsInfo[i].Scheduledtime).ToShortDateString() + "<br/>" + Convert.ToDateTime(DataSourceMeetingsInfo[i].Scheduledtime).ToShortTimeString()%></div>
                              <div class="col2_meet"><%=DataSourceMeetingsInfo[i].Purpose %></div>
                              <div class="col3_meet"><%=DataSourceMeetingsInfo[i].Location %></div>
                            </div>
                             <!-- contractors listing box open -->
                             <% 
                             DataSourceMeetingAccepted = ConstructionBidOnline.Biz.MeetingAcceptanceOrDecline.GetMeetingAcceptanceOrDeclineByStatus(DataSourceMeetingsInfo[i].MeetingID, "Accepted");
                             DataSourceMeetingRejected = ConstructionBidOnline.Biz.MeetingAcceptanceOrDecline.GetMeetingAcceptanceOrDeclineByStatus(DataSourceMeetingsInfo[i].MeetingID, "Rejected"); 
                                      %>
                          <div class="contractor_listbx">
                          	<div class="contractor_listbx_tp"></div>
                          	<div class="contractor_listbx_mid">
                            	<h1 class="accepted">Accepted Contractors</h1>
                            	<div class="contractor_list_row">
                            	    <%if (DataSourceMeetingAccepted.Count > 0)
                                   { 
                                       for(int j=0;j<DataSourceMeetingAccepted.Count;j++)
                                       {%>
                                	<div class="contractor_list_data"><%=ConstructionBidOnline.Biz.RegisteredUser.GetRegisteredUserByID(DataSourceMeetingAccepted[j].UserID_RK).FirstName + " " + ConstructionBidOnline.Biz.RegisteredUser.GetRegisteredUserByID(DataSourceMeetingAccepted[j].UserID_RK).LastName%></div>
                                    <%}
                                   }
                                   else
                                   { %>
                                    <div class="contractor_list_data">No contracters accepted the meeting</div>
                                    <%} %>
                                </div>
                                
                                <h1 class="declined">Declined Contractors</h1>
                            	<div class="contractor_list_row">
                                	<%if (DataSourceMeetingRejected.Count > 0)
                                   {
                                       for (int j = 0; j < DataSourceMeetingRejected.Count; j++)
                                       {%>
                                	<div class="contractor_list_data"><%=ConstructionBidOnline.Biz.RegisteredUser.GetRegisteredUserByID(DataSourceMeetingRejected[j].UserID_RK).FirstName + " " + ConstructionBidOnline.Biz.RegisteredUser.GetRegisteredUserByID(DataSourceMeetingRejected[j].UserID_RK).LastName%></div>
                                    <%}
                                   }
                                   else
                                   { %>
                                    <div class="contractor_list_data">No contracters rejected the meeting</div>
                                    <%} %>
                                </div>

                            </div>
                          	<div class="contractor_listbx_btm"></div>
                          </div>
                          <!-- contractors listing box close -->
                            
                            <%}
                              }
                              else
                              { %>
                              <div class="attch_tbl_row">
                              <div class="col1_meet"></div>
                              <div class="col2_meet">No Meeting scheduled</div>
                              <div class="col3_meet"></div>
                            </div>
                            <%} %>

                           



                          </div>
                          
                          
                        </div>
                      </div>
                    </div>
                    <div> </div>

                  </div>
                  <!-- tab 6 content close -->
            </div>
            </div>
            <!-- tab content close -->
            
        </div>

        <!-- job detail tab block close -->
          </div>
          <!-- jobdetail content close -->


   
          
          
          <!-- jobdetail content close -->
        <div class="mainbox_bttm"></div>
      </div>
    <div class="box_sep"></div>

    
    <!-- project detail data open -->
    <!-- proposal filter open -->
    <div class="proposal_wrap">
    	<div class="left">
    	<ul class="proposal_tabs">
            <li class="sel" lang="#prop_tabs1"><a href="#">Total Proposals<span>(<%=BidTable.Count %>)</span></a></li>
            <li lang="#prop_tabs2"><a href="#">Declined<span>(<%=BidTableDeclined.Count%>)</span></a></li>
          </ul>
   	</div>
    	</div>
    	<!-- proposal filter close -->
    	<!-- data wrap open -->
    	<div id="prop_tabs1" class="proposal_tabs_cont">

    	<div class="byr_data_tbl_wrap">

    <!-- data tbl head open -->
   	<div class="byr_data_tbl_hd">
    <div class="byr_data_tbl_hd_lft">
    <div class="byr_data_tbl_hd_rgt">
    <!-- heading open -->
    	<div class="byr_tbl_hd_col1">Provider/ Submit Date</div><div class="byr_tbl_hd_col2">Location</div><div class="byr_tbl_hd_col3">Rating</div><div class="byr_tbl_hd_col4">Portfolio</div><div class="byr_tbl_hd_col5">Amount</div><!-- heading close --></div></div></div><!-- data tbl head close -->
    	<%if (BidTable.Count > 0)
  { 
      for(int i=0;i<BidTable.Count;i++){
      %>    
    <!-- data row open -->
    <div class="byr_data_tbl_row">
    <!-- row data open -->
    	<div class="byr_tbl_hd_col1">
        	<p class="byr_img_blk">
        	<a href="ContractorPublicProfile.aspx?cid=<%=BidTable[i].CompanyID_RKRegisteredUser %>">
        	<%if (ConstructionBidOnline.Biz.ProfileImages.GetProfileImage(BidTable[i].CompanyID_RKRegisteredUser) != null)
             {
                 %>
        	  <img src="../ProfileImages/<%=ConstructionBidOnline.Biz.ProfileImages.GetProfileImage(BidTable[i].CompanyID_RKRegisteredUser).ProfileImage %>" alt="" />
        	  <%}
             else
             {
                  %>
              <img src="../images/byrs/img.jpg" alt="" />
                  <%} %>
        	
        	</a>
        	</p>
        	<p>
        	
        	<a <%if (jobObj.AwardedBidID == BidTable[i].BidID) { Response.Write("class='award'"); }  %> href="ContractorPublicProfile.aspx?cid=<%=BidTable[i].CompanyID_RKRegisteredUser %>">
        	<%=BidTable[i].Companyname %>
        	</a>
        	</p>
        	<p><%=BidTable[i].CompanyTagLine %></p></div><div class="byr_tbl_hd_col2"><%=BidTable[i].City %></div><div class="byr_tbl_hd_col3">
        	
        	<%
                DataSourceContractorsBids = ConstructionBidOnline.Biz.Bid.GetBidByCompanyID(BidTable[i].CompanyID_RKRegisteredUser);
                   for (int j=0; j < DataSourceContractorsBids.Count; j++)
                   {
                       contractObj = ConstructionBidOnline.Biz.Contracts.GetContractsByJobID(DataSourceContractorsBids[j].JobID_RKJobs);
                       if ((contractObj != null) && (contractObj.IsContractorFeedBackGiven == true))
                       {
                           reviewcount++;
                           TotalJobCount++;
                           TotalRating = TotalRating + ((contractObj.CFFC + contractObj.CFFS + contractObj.CFFV + contractObj.CFFPR + contractObj.CFFP + contractObj.CFFCQ + contractObj.CFFJC + contractObj.CFFAB) / 8);
                       }
                   }
                          %>
                          
                          
                                    <div class="white_progressBar">
                                    <div class="white_star"><img src="../images/prof_gry_star.png" alt="" /></div>
                                      <div class="white_progressMeter" style="width: <%if(TotalJobCount > 0) Response.Write((TotalRating/TotalJobCount*100)/5); else Response.Write(0);  %>%;">&nbsp;</div>
                                    </div>
            <span> <a href="javascript: void(0)"><%=reviewcount %></a> reviews</span></div>
            <div class="byr_tbl_hd_col4">
            <a href="ContractorPublicProfile.aspx?cid=<%=BidTable[i].CompanyID_RKRegisteredUser %>" class="port">
            <img src="../images/trans.gif" alt="" width="1" height="1" />
            </a>
            </div>
            <div class="byr_tbl_hd_col5"><span>$ <%=BidTable[i].BidAmount %></span></div><!-- row data close --><!-- show hide content wrap open --><div class="show_cont_wrap">

    <div class="show_cont_links">
    	<a href="javascript: void(0)" onclick="PerformAction('<%Response.Write(BidTable[i].BidID); %>','2'); return false;" class="decline">Decline</a>
        <a href="javascript: void(0)" onclick="PerformAction('<%Response.Write(BidTable[i].BidID); %>','0'); return false;" class="select">Select</a>
        <span class="showhide">
        <a href="#" id="hide_1" class="hide" lang="#showme_1">Hide Proposal</a>
        <a href="#" id="show_1" class="show" lang="#showme_1" >Show Proposal</a>
        </span>

    </div>
    <!-- content container open -->
    <div class="show_container" id="showme_1">
    <!-- container top row open -->
    <div class="toprow">
    	    <div class="left">Submission Date:  <span><%=BidTable[i].BidDate.ToString("MMM, dd, yyyy.")%></span></div><div class="right">Start within:  <span>Within <%=BidTable[i].StartUpWithin %></span></div></div><!-- container top row close --><div class="show_mid_container">
    
    <!-- proposal section open -->
    <div id="proposal">
      <p class="bold">Proposal</p>
      <p class="tareacont">
      <textarea class="txtarea" readonly="readonly"><%=BidTable[i].MessageInfo %></textarea>
      </p>
      <p class="proposl_links">
      <a href="#" class="print_propsl">Print Proposal</a>
      <a href="javascript: void(0)" onclick='ReportViolation("Bid",<%=BidTable[i].BidID %>)' class="violet_propsl">Report Violation </a>
      Bid id: <span><%=BidTable[i].BidID %></span>
      </p>
      <p>Attachment :  <a href="../BidAttachments/<%=BidTable[i].Attachment %>"><%=BidTable[i].Attachment %></a></p>
      </div><!-- proposal section close -->
      <!-- mynotes section open -->
      <div id="notes">
      <p class="bold">My Notes (Not visible to provider)</p>
      <p class="tarea_cont">
      <textarea class="txtarea" readonly="readonly"><%=BidTable[i].BuyerNote %></textarea>
      </p>

      <p class="proposl_links">
      <a id="linkbidsave" href="javascript: void(0)" onclick="PerformAction('<%Response.Write(BidTable[i].BidID); %>','1'); return false;" class="print_notes">Add Note</a>
      </p>
    </div>
    <!-- mynotes section open -->
    </div>
    
    </div>
    <!-- content container close -->
    </div>

    <!-- show hide content wrap close -->
    </div>
    <%}}else {%>
    <!-- data row close -->
    <!-- -->
    <div class="byr_data_tbl_row">
    <!-- row data open -->
    	<div class="byr_tbl_hd_col1">
    	  	<p>No open proposal submitted yet.</p></div><!-- row data close --></div><!-- --><%} %>
    </div>
    </div>
    <!-- data wrap close -->
    
    <!-- data wrap open -->
    	<div id="prop_tabs2" class="proposal_tabs_cont">

    	<div class="byr_data_tbl_wrap">

    <!-- data tbl head open -->
   	<div class="byr_data_tbl_hd">
    <div class="byr_data_tbl_hd_lft">
    <div class="byr_data_tbl_hd_rgt">
    <!-- heading open -->
    	<div class="byr_tbl_hd_col1">Provider/ Submit Date</div><div class="byr_tbl_hd_col2">Location</div><div class="byr_tbl_hd_col3">Rating</div><div class="byr_tbl_hd_col4">Portfolio</div><div class="byr_tbl_hd_col5">Amount</div><!-- heading close --></div></div></div><!-- data tbl head close -->
    	<%if (BidTableDeclined.Count > 0)
  {
      for (int i = 0; i < BidTableDeclined.Count; i++)
      {
      %>    
    <!-- data row open -->
    <div class="byr_data_tbl_row">
    <!-- row data open -->
    	<div class="byr_tbl_hd_col1">
        	<p class="byr_img_blk">
        	<a href="ContractorPublicProfile.aspx?cid=<%=BidTableDeclined[i].CompanyID_RKRegisteredUser %>">
        	<%if (ConstructionBidOnline.Biz.ProfileImages.GetProfileImage(BidTableDeclined[i].CompanyID_RKRegisteredUser) != null)
             {
                 %>
        	  <img src="../ProfileImages/<%=ConstructionBidOnline.Biz.ProfileImages.GetProfileImage(BidTableDeclined[i].CompanyID_RKRegisteredUser).ProfileImage %>" alt="" />
        	  <%}
             else
             {
                  %>
              <img src="../images/byrs/img.jpg" alt="" />
                  <%} %>
        	</a>
        	</p>
        	<p>
        	<a href="ContractorPublicProfile.aspx?cid=<%=BidTableDeclined[i].CompanyID_RKRegisteredUser %>"><%=BidTableDeclined[i].Companyname%>
        	</a>
        	</p>
        	<p><%=BidTableDeclined[i].CompanyTagLine%></p></div><div class="byr_tbl_hd_col2"><%=BidTableDeclined[i].City%></div><div class="byr_tbl_hd_col3">
            <telerik:RadRating ID="RadRating2" runat="server" Enabled="false" Value="0">
            </telerik:RadRating>
            <span> <a href="#">0</a> reviews</span></div><div class="byr_tbl_hd_col4"><a href="ContractorPublicProfile.aspx?cid=<%=BidTableDeclined[i].CompanyID_RKRegisteredUser %>" class="port"><img src="../images/trans.gif" alt="" width="1" height="1" /></a></div><div class="byr_tbl_hd_col5"><span>$ <%=BidTableDeclined[i].BidAmount%></span></div><!-- row data close --><!-- show hide content wrap open --><div class="show_cont_wrap">

    <div class="show_cont_links">
    	<a href="javascript: void(0)" onclick="PerformAction('<%Response.Write(BidTableDeclined[i].BidID); %>','2'); return false;" class="decline">Decline</a>
        <a href="javascript: void(0)" onclick="PerformAction('<%Response.Write(BidTableDeclined[i].BidID); %>','0'); return false;" class="select">Select</a>
        <span class="showhide">
        <a href="#" id="hide_1" class="hide" lang="#showme_1">Hide Proposal</a>
        <a href="#" id="show_1" class="show" lang="#showme_1" >Show Proposal</a>
        </span>

    </div>
    <!-- content container open -->
    <div class="show_container" id="Div2">
    <!-- container top row open -->
    <div class="toprow">
    	<div class="left">Submission Date:  <span><%=BidTableDeclined[i].BidDate%></span></div><div class="right">Startup Timeframe:  <span>Within <%=BidTableDeclined[i].StartUpWithin%></span></div></div><!-- container top row close --><div class="show_mid_container">
    
    <!-- proposal section open -->
    <div id="proposal">
      <p class="bold">Proposal</p>
      <p>
      <textarea name="" class="txtarea" cols="" rows="" disabled="disabled" ><%=BidTableDeclined[i].MessageInfo%></textarea>
      </p>
      <p class="proposl_links"><a href="#" class="print_propsl">Print Proposal</a>
      <a href="javascript: void(0)" onclick='ReportViolation("Bid",<%=BidTableDeclined[i].BidID %>)' class="violet_propsl">Report Violation </a>
      Bid id: <span><%=BidTableDeclined[i].BidID%></span>
      </p>
      </div>
      <!-- proposal section close -->
      <!-- mynotes section open -->
      <div id="notes">
      <p class="bold">My Notes (Not visible to provider)</p><p class="bold">
        <textarea name="textarea" id="<%Response.Write(BidTableDeclined[i].BidID); %>" cols="" rows="" class="txtarea" disabled="disabled"><%=BidTableDeclined[i].BuyerNote%></textarea>
      </p>

      <p class="proposl_links">
      <a id="linkbidsave" href="javascript: void(0)" onclick="PerformAction('<%Response.Write(BidTableDeclined[i].BidID); %>','1'); return false;" class="print_notes">Add Note</a>
      </p>
    </div>
    <!-- mynotes section open -->
    </div>
    
    </div>
    <!-- content container close -->
    </div>

    <!-- show hide content wrap close -->
    </div>
    <%}}else {%>
    <!-- data row close -->
    <!-- -->
    <div class="byr_data_tbl_row">
    <!-- row data open -->
    	<div class="byr_tbl_hd_col1">
    	  	<p>No declined proposal yet.</p></div><!-- row data close --></div><!-- --><%} %>
    </div>
    </div>
    
    
    
    
    <!-- data wrap close -->
    <!-- project detail data close -->
    <div class="clear"></div>
<%--    <!-- pagination open -->
    <div class="pagination">&nbsp;<span class="this-page">1</span><a href="javascript:;" >2</a><a href="javascript:;" >3</a><a href="javascript:;" >4</a><span class="break">...</span><a href="javascript:;" >19</a><a href="javascript:;" >Next</a>

    <!-- pagination close -->
</div>--%>
      <!-- main box close -->
    </div>
    <!-- left col close -->
    
    <telerik:RadWindow ID="radWin" name="radWin" RegisterWithScriptManager="true" 
        VisibleStatusbar="false" VisibleTitlebar="false"
        EnableViewState="true" OnClientClose="" 
        KeepInScreenBounds="true" Behaviors="None"
        Modal="true"  NavigateUrl="Action.aspx" runat="server" Animation="FlyIn" 
        AnimationDuration="1000" AutoSize="true" BorderStyle="None" 
        Skin="Sitefinity"></telerik:RadWindow>
        
        <telerik:RadWindow ID="radWinSendInvitation" name="radWin" RegisterWithScriptManager="true" 
        VisibleStatusbar="false" EnableViewState="true" OnClientClose="" 
        KeepInScreenBounds="true" Behaviors="Close"
        Modal="true"  NavigateUrl="SendInvitation.aspx" runat="server" Animation="Fade" 
        AnimationDuration="1000" AutoSize="true" BorderStyle="None" 
        Skin="Windows7" OpenerElementID="sendinvitation"></telerik:RadWindow>
        
        <telerik:RadWindow ID="radWinUploadFile" name="radWin" RegisterWithScriptManager="true" 
        VisibleStatusbar="false"
        EnableViewState="true" OnClientClose="" 
        KeepInScreenBounds="true" Behaviors="Close"
        Modal="true"  NavigateUrl="uploadfile.aspx" runat="server" Animation="Fade" 
        AnimationDuration="1000" AutoSize="true" BorderStyle="None" 
        Skin="Windows7" ></telerik:RadWindow>
        
        <telerik:RadWindow ID="radWinBiddingSettings" name="radWin" RegisterWithScriptManager="true" 
        VisibleStatusbar="false" EnableViewState="true" OnClientClose="" 
        KeepInScreenBounds="true" Behaviors="Close"
        Modal="true"  NavigateUrl="BidingSettings.aspx" runat="server" Animation="Fade" 
        AnimationDuration="1000" AutoSize="true" BorderStyle="None" 
        Skin="Windows7" ></telerik:RadWindow>
        
        <telerik:RadWindow ID="radWinReportViolation" name="radWin" RegisterWithScriptManager="true" 
        VisibleStatusbar="false" EnableViewState="true" OnClientClose="" 
        KeepInScreenBounds="true" Behaviors="Close, Move, Reload"
        Modal="true"  NavigateUrl="ReportViolation.aspx" runat="server" 
        VisibleTitlebar="true" Animation="Resize" AutoSize="true" 
        AnimationDuration="1000" ></telerik:RadWindow>
        
        
        <telerik:RadWindow ID="radWinAddEditJobDescription" name="radWin" RegisterWithScriptManager="true" 
        EnableViewState="true" OnClientClose="" 
        KeepInScreenBounds="true" Behaviors="Close, Move, Reload"
        Modal="true"  NavigateUrl="AddEditJobDescription.aspx" runat="server" 
        VisibleTitlebar="true" Animation="Resize" AutoSize="true" VisibleStatusbar="false"
        AnimationDuration="1000" ></telerik:RadWindow>
        
        
        <telerik:RadWindow ID="radWinDeleteFile" name="radWin" RegisterWithScriptManager="true" 
        VisibleStatusbar="false"
        EnableViewState="true" OnClientClose="" 
        KeepInScreenBounds="true" Behaviors="Close"
        Modal="true"  NavigateUrl="DeleteFiles.aspx" runat="server" Animation="Fade" 
        AnimationDuration="1000" AutoSize="true" BorderStyle="None" 
        Skin="Windows7" ></telerik:RadWindow>
        
    </asp:Content>

